<%@ page import="myschool.service.GradeService" %>
<%@ page import="myschool.entity.Grade" %>
<%@ page import="java.util.List" %><%--
  Created by IntelliJ IDEA.
  User: admin
  Date: 2022/7/3
  Time: 10:32
  To change this template use File | Settings | File Templates.
--%>
<%@ page contentType="text/html;charset=UTF-8" language="java" %>
<html>
<head>
    <title>3：通过表单添加新学生，注意日期和年级的处理</title>
</head>
<body>
<form action="doaddstu.jsp">
    <p>姓名<input type="text" name="sname" placeholder="请输入姓名" required></p>
    <p>性别<input type="radio" name="sex" value="男" >男
        <input type="radio" name="sex" value="女" >女
        <input type="radio" name="sex" value="妖" >妖
        <input type="radio" name="sex" value="人妖" >人妖
    </p>
    <p>电话<input type="text" name="telephone" placeholder="请输入联系电话" required></p>
    <p>QQ<input type="text" name="qq" placeholder="请输入QQ号" required></p>
    <p>微信<input type="text" name="wechat" placeholder="请输入微信号" required></p>
    <p>年级编号<select name="gid"><%
        List<Grade> grades = GradeService.ME.findALL();
        for (Grade g : grades) {
    %>
        <option  value="<%=g.getId()%>"><%=g.getName()%>
        </option>
        <%}%>
    </select></p>
    <p>入学时间<input type="date" name="enterdate" placeholder="请选择入学日期" required></p>
    <p>城市<select name="city">
        <option>合肥</option>
        <option>芜湖</option>
        <option>宣城</option>
        <option>黄山</option>
        <option>马鞍山</option>
        <option>蚌埠</option>
        <option>六安</option>
        <option>阜阳</option>
        <option>淮北</option>
        <option>淮南</option>
        <option>铜陵</option>
        <option>安庆</option>
        <option>滁州</option>
        </select></p>
    <p>生日<input type="date" name="birthday" placeholder="请选择出生日期" required></p>
    <p>地址<input type="text" name="address" placeholder="请输入现住址" required></p>
    <p>密码<input type="password" name="pass" placeholder="请输入密码" required></p>
    <p>身份证<input type="text" name="idcardpic" placeholder="请输入身份证号码" required></p>
    <p><button type="submit">提交</button></p>
</form>
</body>
</html>
